CMD tutorial
author: Mojtaba Eshghi
making batch programs using cmd
1-you should first type your program using notepad and then save them with the extention of *.bat or
2-you can use the "copy con filename.bat" command.like in;(you should press Ctrl&Z at the end of your program)
C:\>copy con new.bat
echo this is the first batch snippet you have written
pause
^Z
1 file(s) copied.
your output file should be something like this

pause
use this command at the end or middle of your snippet to tell cmd.exe that hangs the interpretation of your *.bat
program.like in the previous example.
call
you can use this command to call your programs in command prompt environment, but remember to write the file extention.
start
starts a separate window to type your desired command
type
displays the content of some of the files like text, doc...
format
formats your hard drives, use "format /?" to get some more help on this command.
ftp
this command causes ftp protocol environment to run, ftp(file transfer protocol) is a part of the URL (uniform resource location) protocol, and you can transfer (send and recieve) your desired files to or from server,
some of ftp commands are described here;
first of all you need an remote server(or you can connect to remote client PC using telnet);
use "o serverip" to open a connection to your remote server and then use "pwd", "cd", "dir", and other commands available(depended on your server) to move to directories you want, use "get filename.extentio" to recieve some files from remote computer, use "send filename.extention" to send some files to your server.
you can view full command list and help for commands using "help" command.
نظرات شما عزیزان:
نوشته شده توسط رامان (متفکر) |
لينک ثابت
|پنج شنبه 4 اسفند 1390برچسب:,|